package com.totoro.mapper;

import com.totoro.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author TOTORO
 * @date 2021/7/19 10:45
 */
@Repository
public interface OrderMapper {

    Integer addMarketOrder(MarketOrder marketOrder);

    Integer addMarketSrOrder(MarketSrOrder marketSrOrder);

    Integer addOrderTimeLineByMid(OrderTimeline orderTimeline);

    List<OrderTimeline> findOrderTimeLineByMid(@Param("mid") int mid);

    Integer updateMarketOrderPrevStatus(@Param("status") int status, @Param("marketOdd") String marketOdd);

    MarketOrder findMarketOrderByMarketOdd(@Param("marketOdd") String marketOdd);

    List<MarketOrder> findAllOrder(@Param("id") Object id, @Param("findType") Integer findType, @Param("status") Integer status);

    Integer[] superFindUserOrderId(BuyerOrderFind buyerOrderFind);

    Integer falseDeleteOrder(@Param("moId") int moId);

    Integer[] findRecoverOrder(@Param("uid") int uid, @Param("curr") int curr);

    Integer trueDeleteOrder(@Param("moIds") int[] moIds);

    Integer reductionOrder(@Param("moIds") int[] moIds);

    Integer[] superFindSellerOrderId(SellerOrderFind sellerOrderFind);

    Integer updateOrder(MarketOrder marketOrder);

    List<MarketOrder> finalFindAllOrderByMoIds(@Param("moIds") Integer[] moIds);

    Integer updateSrOrderPayPrice(@Param("msroId") int msroId, @Param("payPrice") double payPrice);

    Integer updateOrderAllPrice(@Param("moId") int moId, @Param("allPrice") double allPrice);

    Integer updateMarketSrOrderCommentStatus(@Param("msroId") int msroId);

    Integer updateMarketSrOrderAppendCommentStatus(@Param("msroId") int msroId);

    MarketOrder findMarketByMarketSrOrderId(@Param("msroId") int msroId);

    MarketSrOrder findMarketSrOrderByMsroId(@Param("msroId") int msroId);

    Integer updateMarketSrReturnStatus(@Param("status")int status, @Param("status2") int status2, @Param("msroId") int msroId);
}
